1. Field of the Invention
The present invention relates generally to digital computer systems, and more specifically to character or code translators for use within such systems.
2. Description of the Prior Art
In digital computer systems, it is often required to translate characters or codes into other characters or codes. The number of characters generated by the translation may be different from the number of input characters. This general translation function may be used with existing data files, and may also be used to interpret characters communicated with input/output devices such as keyboards or printers.
Typically, procedures for performing such translations are uniquely coded for specific applications. If the translation is only between single characters, a look up table may be used. However, if more complex translations are required, such as translation of multiple input characters to one or more output characters, such look up tables are not sufficient. Therefore, the information regarding the translation is generally hard coded into the translation procedure.
When translators are written with a specific task in mind, it is often difficult to modify them for use with other, similar translation tasks. For example, a keyboard decoder can be used to translate keyboard scan codes into characters for input to a computer system. It is known that the alphabets of different countries typically utilize slightly different alphabets, so that different decoders must be written for each country. For a system which is intended for use in numerous countries, the separate generation of different keyboard decoders can be expensive and time consuming, and can lead to the generation of subtle errors which are difficult to track down.
Another problem with hard coded translators is that they may not easily be dynamically changed. As an example, it is sometimes desirable for a user to translate a file written in a first national character set into a file written in a second national character set. Then, translation of either of these files may be desirable into a third national character set. In addition to the requirement that each of the translators be made available, the user must invoke different translators for each translation to be made. This can complicate the job of the user, leading to undesired inefficiencies.
It would be desirable to provide a translation technique which is powerful enough to handle extremely complex translational tasks. It would be further desirable to provide such a translator which can be easily modified dynamically to provide different translation functions.